Skip to content

Restore public parseUnprocessedTransformOriginString - #58893

Open
cipolleschi wants to merge 1 commit into
mainfrom
restore-parse-unprocessed-transform-origin-string
Open

cipolleschi wants to merge 1 commit into
mainfrom
restore-parse-unprocessed-transform-origin-string

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary:

The Android react-native-unistyles job in the nightly tests has failed since the 20261003 nightly:

TransformOriginConverter.cpp:124:20: error: no member named
'parseUnprocessedTransformOriginString' in namespace 'facebook::react'

#58786 moved the transform-origin helpers from react/renderer/components/view/conversions.h into conversions.cpp. One of them, parseUnprocessedTransformOriginString, was an inline function in the public header, and it ended up in an anonymous namespace in the .cpp. Libraries can't call it anymore. Unistyles calls it on React Native 0.85 and newer (only when RN_SERIALIZABLE_STATE is defined, so in practice only on Android).

This change declares parseUnprocessedTransformOriginString(const std::string&, TransformOrigin&) in conversions.h again and moves its definition out of the anonymous namespace. The implementation stays in conversions.cpp, and the signature uses only std::string and TransformOrigin, so no CSS headers leak back into the public header. The other helpers #58786 made private stay private.

Changelog:

[GENERAL] [FIXED] - Restore public parseUnprocessedTransformOriginString in react/renderer/components/view/conversions.h

Test Plan:

  • Regenerated the C++ API snapshots with Doxygen 1.16.1, the version CI uses: python -m scripts.cxx-api.parser. For the Common and Apple views, the only diff this change causes is one restored line: void facebook::react::parseUnprocessedTransformOriginString(const std::string& value, facebook::react::TransformOrigin& result);. That is the same line Make renderer View conversions CSS-free (#58786) #58786 removed. My local Apple output also had extra codegen entries for the sample TurboModule, so I left those out of the commit.
  • In my environment the Android views fail to generate even on clean main (Identifier basic_appender already exists in scope v12). I added the same line by hand to the three Android snapshots, at the position Make renderer View conversions CSS-free (#58786) #58786 removed it from. The validate-cxx-api-snapshots job will confirm them.
  • yarn format-check-cpp: no violations in repository files.
  • I couldn't build the C++ locally, so I'm relying on CI for compilation. The change only moves an existing function definition out of an anonymous namespace and adds its declaration.
  • After this lands, the Android unistyles job in the nightly tests should compile TransformOriginConverter.cpp again.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Oct 6, 2026
@meta-codesync

meta-codesync Bot commented Oct 6, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D123667938.

#58786 moved parseUnprocessedTransformOriginString from an inline function in
conversions.h into an anonymous namespace in conversions.cpp. Third-party libraries
call it (react-native-unistyles uses it on React Native >= 0.85), so they no longer
compile on Android.

Declare it again in conversions.h and keep the implementation in conversions.cpp, so
no CSS headers leak back into the public header.
@cipolleschi
cipolleschi force-pushed the restore-parse-unprocessed-transform-origin-string branch from 3b9f131 to 9cd8de3 Compare October 7, 2026 16:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant